package cate.common.table.activity.brightmythequipment.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteField;

/**
 * @author liuyunke
 * @program: cate-game
 * @create
 * @description:
 */
public class BrightMythDetailRow extends ERow implements RWItem {
    @NoteField("活动配置id")
    public int configId;
    @NoteField("抽取权重")
    public int weight;
    @NoteField("奖励分组")
    public int groupId;
    @NoteField("限抽次数")
    public int limitTimes;
    @NoteField("奖励")
    public String reward;
    @NoteField("刷新权重")
    public int refreshWeight;
    @NoteField("格子")
    public int grid;
    @NoteField("是否公告")
    public int ifLamp;

    @Override
    public void parse(XSSFRowWrap xrw) {
        this.id = xrw.getInteger("ID");
        this.configId = xrw.getInteger("活动配置id");
        this.weight = xrw.getInteger("抽取权重",0);
        this.groupId = xrw.getInteger("奖励分组");
        this.limitTimes = xrw.getInteger("限抽次数");
        this.reward = xrw.getString("奖励");
        this.refreshWeight = xrw.getInteger("刷新权重",0);
        this.grid = xrw.getInteger("格子",-1);
        this.ifLamp = xrw.getInteger("是否公告", 0);
    }

    @Override
    public double getWeight() {
        return refreshWeight;
    }
}
